import Vue from 'vue'
import App from './App'
import store from './store'
import 'common/style/common.scss'
import appLogin from './utils/appLogin.js'
// 后台截数据 不需要字典
import dict from './components/Dict'
import LoadVue from './components/Load/Load.vue' //加载图标
import ButtonAllVue from './components/Button/ButtonAll.vue' //按钮,两个按钮，小按钮
import ButtonVue from './components/Button/Button.vue' //单个按钮  
import UserInfoCardVue from './components/UserInfo/UserInfoCard.vue'
Vue.use(dict);

// 地图
// import BaiduMap from 'vue-baidu-map'
// import {BmlMarkerClusterer} from 'vue-baidu-map'
// Vue.component('bml-marker-cluster', BmlMarkerClusterer)
// Vue.use(BaiduMap, {
//     ak: 'your ak'
// })

import VueBarcode from '@xkeshi/vue-barcode'; //导入条形码插件
Vue.component('barcode', VueBarcode); //声明条形码组件
Vue.component("LoadVue", LoadVue)
Vue.component("ButtonAllVue", ButtonAllVue)
Vue.component("ButtonVue", ButtonVue)
Vue.component("UserInfoCardVue", UserInfoCardVue)
Vue.config.productionTip = false

Vue.prototype.$store = store
App.mpType = 'app'

// 引入uview
import uView from "@/uview-ui";
// import uView from '@/node_modules/uview-ui';
Vue.use(uView);

// 全局挂载方法
Vue.prototype.$global = {
	appLogin
}
// 将onLaunch 同步
Vue.prototype.$onLaunched = new Promise(resolve => {
	Vue.prototype.$isResolve = resolve
	resolve()
})

Vue.filter('fixed', (val) => {
	if (typeof(val) === 'undefined') return ''
	return val.toFixed(2)
})

const app = new Vue({
	store,
	...App
})
app.$mount()